<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<meta name="viewport"
	content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description"
	content="碳氢知识平台由碳三氢二个人创建，属于免费开放的知识浏览平台。该平台主要用于学习Java相关的知识。">
<meta name="keywords"
	content="碳氢知识,碳三氢二,tansanqinger,tanqingzhishi,C3H2,c3h2,碳十八氢十二,碳三,tansan,C18H12">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="spm_prefix" content="333.851">
<link rel="icon" href="/img/index.ico" />
<link rel="shortcut icon" href="/img/index.ico" />
<meta charset="UTF-8" name="viewport"
	content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="/layui/css/layui.css">
<link rel="stylesheet"
	href="https://demo.easyweb.vip/iframe/assets/module/admin.css?v=318" />
<script src="/layui/layui.js"></script>

<link rel="stylesheet"
	href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/css/bootstrap.min.css"
	integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk"
	crossorigin="anonymous">
<script
	src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js"
	integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
	crossorigin="anonymous"></script>
<script
	src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
	integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
	crossorigin="anonymous"></script>
<script
	src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/js/bootstrap.min.js"
	integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI"
	crossorigin="anonymous"></script>
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.js"></script>
<script type="text/javascript"
	src="https://demo.easyweb.vip/iframe/assets/js/common.js?v=318"></script>
<title>碳氢知识</title>
<style type="text/css">
* {
	margin: 0px auto;
	padding: 0px auto;
}

body, html {
	background-color: #F5F5F5;
	width: 100%;
	height: 100%;
	min-width: 1280px;
	min-height: 800px;
}

.paddingRightLeft0 {
	padding-right: 0px;
	padding-left: 0px;
}

.col, .col-1, .col-10, .col-11, .col-12, .col-2, .col-3, .col-4, .col-5,
	.col-6, .col-7, .col-8, .col-9, .col-auto, .col-lg, .col-lg-1,
	.col-lg-10, .col-lg-11, .col-lg-12, .col-lg-2, .col-lg-3, .col-lg-4,
	.col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-auto,
	.col-md, .col-md-1, .col-md-10, .col-md-11, .col-md-12, .col-md-2,
	.col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8,
	.col-md-9, .col-md-auto, .col-sm, .col-sm-1, .col-sm-10, .col-sm-11,
	.col-sm-12, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6,
	.col-sm-7, .col-sm-8, .col-sm-9, .col-sm-auto, .col-xl, .col-xl-1,
	.col-xl-10, .col-xl-11, .col-xl-12, .col-xl-2, .col-xl-3, .col-xl-4,
	.col-xl-5, .col-xl-6, .col-xl-7, .col-xl-8, .col-xl-9, .col-xl-auto {
	padding-left: 0px;
	padding-top: 0px;
}

.pageTopSize {
	width: 100%;
	height: 90%;
	margin-top: 0px;
	margin-left: 0px;
	margin-bottom: 0px;
	margin-right: 0px;
	padding-top: 0px;
	padding-bottom: 0px;
	padding-left: 0px;
	padding-right: 0px;
}

.pageBottomSize {
	width: 100%;
	height: 10%;
	margin-top: 0px;
	margin-left: 0px;
	margin-bottom: 0px;
	margin-right: 0px;
	padding-top: 0px;
	padding-bottom: 0px;
	padding-left: 0px;
	padding-right: 0px;
}

.fixed {
	position: fixed;
	left: 0px;
	bottom: 0px;
	width: 100%;
	height: 54px;
	z-index: 9999;
	background-color: #F5F5F5;
}

.fixedBottom {
	left: 0px;
	bottom: 0px;
	width: 100%;
	height: 54px;
}

a:link {
	color: #000;
}

a:visited {
	color: #000;
}

a:hover {
	text-decoration: none;
}

.viridian {
	background-color: #3F7F62;
}

.turquoise {
	background-color: #40E0D0;
}

.layui-nav .layui-nav-more {
	border-top-color: #000000;
	margin-top: -0px;
}

.layui-nav .layui-nav-mored {
	border-color: transparent transparent #000000;
	margin-top: -5px;
}
</style>
</head>
<body>
	<div class="container">
		<div class="row">
			<div style="text-align: center; height: 70px; line-height: 70px;">
				<img alt="" src="/img/logo_interface.png"
					style="height: 40px; display: inline-block; vertical-align: middle; padding: 0 1.75rem" />
			</div>
			<div class="col-6" style="line-height: 70px; font-size: 30px;">
				<ul class="layui-nav" lay-filter=""
					style="background-color: #F5F5F5;">
					<span th:each="menus:${menuAll}">
						<li class="layui-nav-item" th:each="menu:${menus}"
						th:if="${menuStat.first}"><a th:href="${menu.hmenuUrl}"
							style="font-size: 30px; color: #000000;"
							th:if="${menu.hmenuOrder}==1">[[${menu.hmenuName}]]</a>
							<dl class="layui-nav-child"
								th:if="${menuStat.last}==false and ${menuStat.first}">
								<!-- 二级菜单 -->
								<dd th:each="menu:${menus}">
									<a th:if="${menu.hmenuOrder}!=1" th:href="${menu.hmenuUrl}"
										style="height: 30px; line-height: 26px;">[[${menu.hmenuName}]]</a>
								</dd>
							</dl></li>
					</span>
				</ul>
			</div>
			<div class="col"
				style="text-align: right; line-height: 70px; font-size: 16px; word-spacing: 16px;">
				<svg width="1em" height="1em" viewBox="0 0 16 16"
					class="bi bi-search" fill="currentColor"
					xmlns="http://www.w3.org/2000/svg">
		  <path fill-rule="evenodd"
						d="M10.442 10.442a1 1 0 0 1 1.415 0l3.85 3.85a1 1 0 0 1-1.414 1.415l-3.85-3.85a1 1 0 0 1 0-1.415z" />
		  <path fill-rule="evenodd"
						d="M6.5 12a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11zM13 6.5a6.5 6.5 0 1 1-13 0 6.5 6.5 0 0 1 13 0z" />
		</svg>
				<span onclick="showImg()">手机APP</span> <span th:if="${user}==null">
					<a href="/login">登陆</a> <a href="/login/register">
						<button type="button" class="btn btn-primary">注册</button>
				</a>
				</span> <span th:if="${user}!=null"> <span class="btn"
					data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
						<img th:src="@{${user.img}}" id="userImgUrl" th:attr="name=${user.img}"
						style="width: 40px; height: 40px; border-radius: 50%;" alt="头像">
				</span>
					<div class="dropdown-menu">
						<a class="dropdown-item" th:if="${user.jurisdiction}==0"
							href="/account/user/index"
							style="height: 30px; line-height: 30px;" target="_blank">账号中心</a>
						<a class="dropdown-item" href="/account/user/message"
							style="height: 30px; line-height: 30px;" target="_blank">消息中心</a>
						<a class="dropdown-item" href="/"
							style="height: 30px; line-height: 30px;">退出登陆</a>
					</div>
				</span>
			</div>
		</div>
	</div>
	<div style="text-align: center;" th:if="${topic==null}"
		id="containerDiv">
		<br>
		<h3>你选择的题目类型你已经全部做完了</h3>
	</div>
	<div class=" container" th:if="${topic!=null}" id="containerDiv"
		th:attr="name=${ttype}">
		<div class="layui-card row">
			<div class="layui-card-body layui-col-xs12">

				<form class="layui-form" lay-filter="" th:if="${ttype}==0">
					<div class="layui-form-item layui-col-xs12" style="margin-top: 0;">
						<div class="layui-inline layui-col-xs12">
							<label class="layui-form-label layui-col-xs12"
								style="width: 100%; text-align: left;"><p>
								<h3>
									（单选题）试题难度：<span id="tdifficultySpan">[[${topic.tdifficulty}]]</span>
									<div id="tmessageSpan">[[${topic.tmessage}]]</div>
								</h3>
								</p></label>
						</div>
						<div class="layui-inline layui-col-xs12">
							<label class="layui-form-label layui-col-xs12"
								style="width: 100%; text-align: left;"><p>&emsp;&emsp;选项A：[[${topic.tanswerall.split("：￥、￥：")[0]}]]</p></label>
						</div>
						<div class="layui-inline layui-col-xs12">
							<label class="layui-form-label layui-col-xs12"
								style="width: 100%; text-align: left;"><p>&emsp;&emsp;选项B：[[${topic.tanswerall.split("：￥、￥：")[1]}]]</p></label>
						</div>
						<div class="layui-inline layui-col-xs12">
							<label class="layui-form-label layui-col-xs12"
								style="width: 100%; text-align: left;"><p>&emsp;&emsp;选项C：[[${topic.tanswerall.split("：￥、￥：")[2]}]]</p></label>
						</div>
						<div class="layui-inline layui-col-xs12">
							<label class="layui-form-label layui-col-xs12"
								style="width: 100%; text-align: left;"><p>&emsp;&emsp;选项D：[[${topic.tanswerall.split("：￥、￥：")[3]}]]</p></label>
						</div>
					</div>
					<div class="layui-form-item layui-col-xs12" style="margin-top: 0;">
						<label class="layui-form-label" style="width: 110px;">选择选项：</label>
						<div class="layui-input-block">
							<div class="layui-col-xs6">
								<input type="radio" lay-filter="raQTxxx" name="typeIdsource"
									value="A" title="选项A"> <input type="radio"
									lay-filter="raQTxxx" name="typeIdsource" value="B" title="选项B">
								<input type="radio" lay-filter="raQTxxx" name="typeIdsource"
									value="C" title="选项C"> <input type="radio"
									lay-filter="raQTxxx" name="typeIdsource" value="D" title="选项D">
							</div>
							<div class="layui-layout-right">
								<button class="layui-btn" lay-filter="eQuestionSubmit"
									lay-submit id="eQuestionSubmit" style="text-align: right;">提交答案</button>
							</div>
						</div>
					</div>
					<div class="layui-form-item layui-col-xs12" style="margin-top: 0;">
						<div class="layui-inline layui-col-xs12" id="tid"
							th:attr="name=${topic.tid}">
							<label class="layui-form-label layui-col-xs12"
								style="width: 100%; text-align: left;"> <span
								th:if="${collect==null}"><span id="collectTopic"><i
										class="layui-icon layui-icon-heart" id="collecticons"></i> <span
										id="collecttionsSpans">收藏本题</span></span>&emsp;&emsp;&emsp;</span> <span
								th:if="${collect!=null}"><span id="collectTopic"><i
										class="layui-icon layui-icon-heart-fill" id="collecticons"
										style="color: red;"></i> <span id="collecttionsSpans">取消收藏</span></span>&emsp;&emsp;&emsp;</span>
								<span id="shieldTopic"><i
									class="layui-icon layui-icon-close"></i> 屏蔽本体</span>&emsp;&emsp;&emsp;
								<span id="reportTopic"><i
									class="layui-icon layui-icon-fonts-del"></i> 举报本题</span>&emsp;&emsp;&emsp;
								<span id="mistakeTopic"><i
									class="layui-icon layui-icon-help"></i> 题目有误？</span>&emsp;&emsp;&emsp;

							</label>
						</div>
					</div>
				</form>


				<form class="layui-form" lay-filter="" th:if="${ttype}==1">
					<div class="layui-form-item layui-col-xs12" style="margin-top: 0;">
						<div class="layui-inline layui-col-xs12">
							<label class="layui-form-label layui-col-xs12"
								style="width: 100%; text-align: left;"><p>
								<h3>
									（多选题）试题难度：<span id="tdifficultySpan">[[${topic.tdifficulty}]]</span>
									<div id="tmessageSpan">[[${topic.tmessage}]]</div>
								</h3>
								</p></label>
						</div>
						<div class="layui-inline layui-col-xs12">
							<label class="layui-form-label layui-col-xs12"
								style="width: 100%; text-align: left;"><p>&emsp;&emsp;选项A：[[${topic.tanswerall.split("：￥、￥：")[0]}]]</p></label>
						</div>
						<div class="layui-inline layui-col-xs12">
							<label class="layui-form-label layui-col-xs12"
								style="width: 100%; text-align: left;"><p>&emsp;&emsp;选项B：[[${topic.tanswerall.split("：￥、￥：")[1]}]]</p></label>
						</div>
						<div class="layui-inline layui-col-xs12">
							<label class="layui-form-label layui-col-xs12"
								style="width: 100%; text-align: left;"><p>&emsp;&emsp;选项C：[[${topic.tanswerall.split("：￥、￥：")[2]}]]</p></label>
						</div>
						<div class="layui-inline layui-col-xs12">
							<label class="layui-form-label layui-col-xs12"
								style="width: 100%; text-align: left;"><p>&emsp;&emsp;选项D：[[${topic.tanswerall.split("：￥、￥：")[3]}]]</p></label>
						</div>
					</div>
					<div class="layui-form-item layui-col-xs12" style="margin-top: 0;">
						<label class="layui-form-label" style="width: 110px;">选择选项：</label>
						<div class="layui-input-block">
							<input type="checkbox" name="like" lay-skin="primary" title="选项A"
								value="A"> <input type="checkbox" name="like"
								lay-skin="primary" title="选项B" value="B"> <input
								type="checkbox" name="like" lay-skin="primary" title="选项C"
								value="C"> <input type="checkbox" name="like"
								lay-skin="primary" title="选项D" value="D">
							<div class="layui-layout-right">
								<span class="layui-btn" lay-filter="eQuestionSubmit" lay-submit
									id="eQuestionSubmit" style="text-align: right;">提交答案</span>
							</div>
						</div>
					</div>
					<div class="layui-form-item layui-col-xs12" style="margin-top: 0;">
						<div class="layui-inline layui-col-xs12" id="tid"
							th:attr="name=${topic.tid}">
							<label class="layui-form-label layui-col-xs12"
								style="width: 100%; text-align: left;"> <span
								th:if="${collect==null}"><span id="collectTopic"><i
										class="layui-icon layui-icon-heart" id="collecticons"></i> <span
										id="collecttionsSpans">收藏本题</span></span>&emsp;&emsp;&emsp;</span> <span
								th:if="${collect!=null}"><span id="collectTopic"><i class="layui-icon layui-icon-heart-fill" id="collecticons" style="color: red;"></i> <span id="collecttionsSpans">取消收藏</span></span>&emsp;&emsp;&emsp;</span>
								<span id="shieldTopic"><i class="layui-icon layui-icon-close"></i> 屏蔽本体</span>&emsp;&emsp;&emsp;
								<span id="reportTopic"><i class="layui-icon layui-icon-fonts-del"></i> 举报本题</span>&emsp;&emsp;&emsp;
								<span id="mistakeTopic"><i class="layui-icon layui-icon-help"></i> 题目有误？</span>&emsp;&emsp;&emsp;
							</label>
						</div>
					</div>
				</form>

				<form class="layui-form" lay-filter="" th:if="${ttype}==2">
					<div class="layui-form-item layui-col-xs12" style="margin-top: 0;">
						<div class="layui-inline layui-col-xs12" id="supportPage">
							<label class="layui-form-label layui-col-xs12"
								style="width: 100%; text-align: left;"><p>
								<h3>
									（判断题）试题难度：<span id="tdifficultySpan">[[${topic.tdifficulty}]]</span>
									<div id="tmessageSpan">[[${topic.tmessage}]]</div>
								</h3>
								</p></label>
						</div>
					</div>
					<div class="layui-form-item layui-col-xs12" style="margin-top: 0;">
						<label class="layui-form-label" style="width: 110px;">选择选项：</label>
						<div class="layui-input-block">
							<div class="layui-col-xs6">
								<input type="radio" lay-filter="raQTxxx" name="typeIdsource"
									value="T" title="正确"> <input type="radio"
									lay-filter="raQTxxx" name="typeIdsource" value="F" title="错误">
							</div>
							<div class="layui-layout-right">
								<span class="layui-btn" lay-filter="eQuestionSubmit" lay-submit
									id="eQuestionSubmit" style="text-align: right;">提交答案</span>
							</div>
						</div>
					</div>
					<div class="layui-form-item layui-col-xs12" style="margin-top: 0;">
						<div class="layui-inline layui-col-xs12" id="tid"
							th:attr="name=${topic.tid}">
							<label class="layui-form-label layui-col-xs12"
								style="width: 100%; text-align: left;"> <span
								th:if="${collect==null}"><span id="collectTopic"><i
										class="layui-icon layui-icon-heart" id="collecticons"></i> <span
										id="collecttionsSpans">收藏本题</span></span>&emsp;&emsp;&emsp;</span> <span
								th:if="${collect!=null}"><span id="collectTopic"><i
										class="layui-icon layui-icon-heart-fill" id="collecticons"
										style="color: red;"></i> <span id="collecttionsSpans">取消收藏</span></span>&emsp;&emsp;&emsp;</span>
								<span id="shieldTopic"><i
									class="layui-icon layui-icon-close"></i> 屏蔽本体</span>&emsp;&emsp;&emsp;
								<span id="reportTopic"><i
									class="layui-icon layui-icon-fonts-del"></i> 举报本题</span>&emsp;&emsp;&emsp;
								<span id="mistakeTopic"><i
									class="layui-icon layui-icon-help"></i> 题目有误？</span>&emsp;&emsp;&emsp;

							</label>
						</div>
					</div>
				</form>

				<form class="layui-form" lay-filter="" th:if="${ttype}==3">
					<div class="layui-form-item layui-col-xs12" style="margin-top: 0;">
						<div class="layui-inline layui-col-xs12" id="supportPage">
							<label class="layui-form-label layui-col-xs12"
								style="width: 100%; text-align: left;"><p>
								<h3>
									（填空题）试题难度：<span id="tdifficultySpan">[[${topic.tdifficulty}]]</span>
									<div id="tmessageSpan">[[${topic.tmessage}]]</div>
								</h3>
								</p></label>
						</div>
					</div>
					<div class="layui-form-item layui-col-xs12" style="margin-top: 0;">
						<label class="layui-form-label" style="width: 110px;">填写答案：</label>
						<div class="layui-input-block">
							<div class="layui-col-xs12" style="padding-right: 100px;">
								<input type="text" name="title" lay-verify="title"
									autocomplete="off" placeholder="请输入答案，多个答案用中文顿号“、”区分"
									class="layui-input" id="tanswerMessage">
							</div>
							<div class="layui-layout-right">
								<span class="layui-btn" lay-filter="eQuestionSubmit" lay-submit
									id="eQuestionSubmit" style="text-align: right;">提交答案</span>
							</div>
						</div>
					</div>
					<div class="layui-form-item layui-col-xs12" style="margin-top: 0;">
						<div class="layui-inline layui-col-xs12" id="tid"
							th:attr="name=${topic.tid}">
							<label class="layui-form-label layui-col-xs12"
								style="width: 100%; text-align: left;"> <span
								th:if="${collect==null}"><span id="collectTopic"><i
										class="layui-icon layui-icon-heart" id="collecticons"></i> <span
										id="collecttionsSpans">收藏本题</span></span>&emsp;&emsp;&emsp;</span> <span
								th:if="${collect!=null}"><span id="collectTopic"><i
										class="layui-icon layui-icon-heart-fill" id="collecticons"
										style="color: red;"></i> <span id="collecttionsSpans">取消收藏</span></span>&emsp;&emsp;&emsp;</span>
								<span id="shieldTopic"><i
									class="layui-icon layui-icon-close"></i> 屏蔽本体</span>&emsp;&emsp;&emsp;
								<span id="reportTopic"><i
									class="layui-icon layui-icon-fonts-del"></i> 举报本题</span>&emsp;&emsp;&emsp;
								<span id="mistakeTopic"><i
									class="layui-icon layui-icon-help"></i> 题目有误？</span>&emsp;&emsp;&emsp;

							</label>
						</div>
					</div>
				</form>

				<form class="layui-form" lay-filter="" th:if="${ttype}==4">
					<div class="layui-form-item layui-col-xs12" style="margin-top: 0;">
						<div class="layui-inline layui-col-xs12" id="supportPage">
							<label class="layui-form-label layui-col-xs12"
								style="width: 100%; text-align: left;"><p>
								<h3>
									（计算题）试题难度：<span id="tdifficultySpan">[[${topic.tdifficulty}]]</span>
									<div id="tmessageSpan">[[${topic.tmessage}]]</div>
								</h3>
								</p></label>
						</div>
					</div>
					<div class="layui-form-item layui-col-xs12" style="margin-top: 0;">
						<label class="layui-form-label" style="width: 110px;">计算结果：</label>
						<div class="layui-input-block">
							<div class="layui-col-xs12" style="padding-right: 100px;">
								<input type="text" name="title" lay-verify="title"
									autocomplete="off" placeholder="给出计算结果即可，不需要过程"
									class="layui-input" id="tanswerMessage">
							</div>
							<div class="layui-layout-right">
								<span class="layui-btn" lay-filter="eQuestionSubmit" lay-submit
									id="eQuestionSubmit" style="text-align: right;">提交答案</span>
							</div>
						</div>
					</div>
					<div class="layui-form-item layui-col-xs12" style="margin-top: 0;">
						<div class="layui-inline layui-col-xs12" id="tid"
							th:attr="name=${topic.tid}">
							<label class="layui-form-label layui-col-xs12"
								style="width: 100%; text-align: left;"> <span
								th:if="${collect==null}"><span id="collectTopic"><i
										class="layui-icon layui-icon-heart" id="collecticons"></i> <span
										id="collecttionsSpans">收藏本题</span></span>&emsp;&emsp;&emsp;</span> <span
								th:if="${collect!=null}"><span id="collectTopic"><i
										class="layui-icon layui-icon-heart-fill" id="collecticons"
										style="color: red;"></i> <span id="collecttionsSpans">取消收藏</span></span>&emsp;&emsp;&emsp;</span>
								<span id="shieldTopic"><i
									class="layui-icon layui-icon-close"></i> 屏蔽本体</span>&emsp;&emsp;&emsp;
								<span id="reportTopic"><i
									class="layui-icon layui-icon-fonts-del"></i> 举报本题</span>&emsp;&emsp;&emsp;
								<span id="mistakeTopic"><i
									class="layui-icon layui-icon-help"></i> 题目有误？</span>&emsp;&emsp;&emsp;

							</label>
						</div>
					</div>
				</form>

			</div>
		</div>
	</div>
	<br>
	<div class=" container" style="display: none;" id="tanswerDiv"> 
	<!-- <div class=" container" id="tanswerDiv"> -->
		<div class="layui-card row">
			<div class="layui-card-body layui-col-xs12">
				<form class="layui-form" lay-filter="">
					<div class="layui-form-item layui-col-xs12" style="margin-top: 0;">
						<label class="layui-form-label layui-col-xs12"
							style="width: 100%; text-align: left;" id="tanswer"></label> <label
							class="layui-form-label layui-col-xs12"
							style="width: 100%; text-align: left;">本题解析：暂无</label>
					</div>
					<hr>
					<div class="layui-form-item layui-col-md12"
						style="height: 60px; width: 60px; margin: 0 10px; line-height: 100px;">
						<img th:src="@{${user.img}}"
							style="width: 60px; height: 60px; border-radius: 50%;" alt="头像"><br>
						<br>
					</div>
					<div class="layui-input-block">
						<div class="layui-col-md11">
							<textarea placeholder="请输入内容" class="layui-textarea"
								style="resize: none;" id="addCommentOneTiterMessage"></textarea>
						</div>
						<div class="layui-col-md1">
							<button class="layui-btn layui-bg-blue" 
								style="height: 100px; border-radius: 5px; margin-left: 15px;"
								id="addCommentOneTiter">
								发表<br>评论
							</button>
						</div>
					</div>
					<div class="layui-form-item layui-col-md12"
						style="padding-left: 110px; margin-top: 5px;">
						<hr>
					</div>

					<div id="commentShowArea"></div>

<script type="text/javascript">
//点赞
function praiseSumbit(cid){
	let params = {};
	params.cid = cid;
	$.ajax({
		url : '/topic/user/praiseSumbit',
		type : 'post',
		data : params,
		dataType : 'json',
		success : function(data) {
			if (data.code == 0) {
				if(data.msg == 0){
					$("#praiseSubmitNumber"+cid).text('');
				} else {
					$("#praiseSubmitNumber"+cid).text(data.msg)
				}
				if(data.ispraise==1) {
					$("#praiseId"+cid).attr('style','line-height: 17px; color: #1E9FFF; margin-left: 20px;');
					$("#praiseSubmitNumber"+cid).css('color','#212529;');
					$("#treadId"+cid).attr('style','line-height: 17px; margin-left: 20px;');
				} else if(data.ispraise==2) {
					$("#praiseId"+cid).attr('style','line-height: 17px; margin-left: 20px;');
					$("#treadId"+cid).attr('style','line-height: 17px; margin-left: 20px;');
				}
			} else {
				layer.msg(data.msg, {
					icon : 2
				});
			}
		}
	});
	return false;
}
//踩
function treadSumbit(cid){
	let params = {};
	params.cid = cid;
	$.ajax({
		url : '/topic/user/treadSumbit',
		type : 'post',
		data : params,
		dataType : 'json',
		success : function(data) {
			if (data.code == 0) {
				if(data.msg == 0){
					$("#praiseSubmitNumber"+cid).text('');
				} else {
					$("#praiseSubmitNumber"+cid).text(data.msg);
				}
				if(data.istread==1) {
					$("#treadId"+cid).attr('style','line-height: 17px; color: #1E9FFF; margin-left: 20px;');
					$("#praiseId"+cid).attr('style','line-height: 17px; margin-left: 20px;');
				} else if(data.istread==2) {
					$("#praiseId"+cid).attr('style','line-height: 17px; margin-left: 20px;');
					$("#treadId"+cid).attr('style','line-height: 17px; margin-left: 20px;');
				}
			} else {
				layer.msg(data.msg, {
					icon : 2
				});
			}
		}
	});
	return false;
}
let writeBackCid = 0;//一级评论id
let writeBackUid = 0;//评论用户id
let writeBackTid = 0;//题目id
let writeBackWcid = 0;//评论的语句的id
//回复点击
function writeBack(cid,uid,tid,uname,wcid){
	$("#addCommentTwoTiterDiv"+writeBackCid).attr("style","padding-left: 110px; display: none;");
	$("#addCommentTwoTiterDiv"+cid).attr("style","padding-left: 110px; display: block;");
	$("#addCommentTwoTiterMessage"+cid).attr("placeholder","回复 @ "+uname+"：");
	writeBackCid = cid;
	writeBackUid = uid;
	writeBackTid = tid;
	writeBackWcid = wcid;
	return false;
}
//提交回复数据
function addCommentTwoTiter(cid){
	let message = $("#addCommentTwoTiterMessage"+cid).val()+'';
	$("#addCommentTwoTiterMessage"+cid).val('');
	if (message.trim() === '') {
		layer.msg("把你的想法先输入到框中吧！", {
			icon : 2
		});
		return false;
	}
	let params = {};
	params.tid = $("#tid").attr('name');
	params.titer = 2;
	params.ctid = writeBackCid;
	params.wuid = writeBackUid;
	params.wcid = writeBackWcid;
	params.message = message;
	$.ajax({
		url : '/topic/user/addComment',
		type : 'post',
		data : params,
		dataType : 'json',
		success : function(data) {
			if (data.code == 0) {
				layer.msg(data.msg, {
					icon : 1
				});
				let dataMessage = "";
				dataMessage +='<div class="layui-col-xs12" style="min-height: 50px; padding: 0px 0px;">'
	        		+'<label class="layui-col-xs12" style="width: 100%; text-align: left; padding: 0px 0px; margin-left: 110px;">'
	        		+	'<div class="layui-col-md12" style="margin: 0 10px;">'
	        		+		'<div class="layui-col-md1" style="width: 50px;">'
	        		+			'<img src="'+$("#userImgUrl").attr("name")+'" style="width: 30px; height: 30px; border-radius: 50%;" alt="头像">'
	        		+		'</div>'
	        		+		'<div class="layui-col-md11">'
	        		+			'<p style="margin-bottom: 0px;"><spen color="#fb7299;">'+data.uname+'</spen>&emsp;'+data.cmessage+'</p>'
	        		+			'<p style="font-size: 14px;">'
	        		+				'<span>'+data.cdate+'</span>';
	        		if(data.cuid==1){
	        			dataMessage +='<i class="layui-icon layui-icon-praise" style="line-height: 17px; color: #1E9FFF; margin-left: 20px;" '
	        				+ 'id="praiseId'+data.cid+'" onclick="praiseSumbit(`'+data.cid+'`);"><span style="padding-left: 2px; '
	        				+ 'font-size: 12px; color: #212529;" id="praiseSubmitNumber'+data.cid+'">';
	        			if(data.cpraise!=0){
	        				dataMessage += data.cpraise;
		        		}
	        			dataMessage += '</span></i>';
	        		} else {
	        			dataMessage += '<i class="layui-icon layui-icon-praise" style="line-height: 17px; margin-left: 20px;" '
	        				+ 'id="praiseId'+data.cid+'" onclick=praiseSumbit(`'+data.cid+'`);><span '
	        				+ 'style="padding-left: 2px; font-size: 12px;" id="praiseSubmitNumber'+data.cid+'">';
	        			if(data.cpraise!=0){
	        				dataMessage += data.cpraise
		        		} else {
		        			dataMessage += '';
		        		}
	        			dataMessage += '</span></i>';
	        		}
	        		dataMessage +='<i class="layui-icon layui-icon-tread" style="line-height: 17px; margin-left: 20px;';
	        		if(data.cuid==2){
	        			dataMessage += 'color: #1e9fff;"';
	        		} else {
	        			dataMessage += '"';
	        		}
	        		dataMessage += 'id="treadId'+data.cid+'" onclick="treadSumbit(`'+data.cid+'`);"></i>';
	        		dataMessage += '<span class="layui-btn layui-btn-xs layui-btn-normal" style="margin-left: 20px;" id="writeBack" onclick="writeBack(`'+data.ctid+'`,`'+data.uid+'`,`'+data.tid+'`,`'+data.uname+'`,`'+data.cid+'`);">回复</span>&emsp;'
	        		+			'</p>'
	        		+		'</div>'
	        		+	'</div>'
	        		+'</label>'
	        		+'</div>';
	        	//if($("#replyToLoad"+cid).attr("name")==0){
					$("#replyToLoadMessageSpan"+cid).after(dataMessage);	
				//} else {
				//	$("#replyToLoadNumber"+cid+($("#replyToLoad"+cid).attr("name")-1)).before(dataMessage);	
				//}
	        	//$("#replyToLoad"+cid).attr("name",parseInt($("#replyToLoad"+cid).attr("name"))+1);
				
				
				
				
				
			} else {
				layer.msg(data.msg, {
					icon : 2
				});
			}
		}
	});
	return false;
}
//查看回复
function selectWriteBack(cid){
	let params = {};
	params.tid = $("#tid").attr('name');
	params.ctid = cid;
	$.ajax({
		url : '/topic/user/replyToLoad',
		type : 'post',
		data : params,
		dataType : 'json',
		success : function(data) {
			var data2 = eval(data);
			let dataMessage = '<span id="replyToLoadMessageSpan'+cid+'">';
	        for(var i in data2){
	        	dataMessage +='<div class="layui-col-xs12" style="min-height: 50px; padding: 0px 0px;">'
	        		+'<label class="layui-col-xs12" style="width: 100%; text-align: left; padding: 0px 0px; margin-left: 110px;">'
	        		+	'<div class="layui-col-md12" style="margin: 0 10px;">'
	        		+		'<div class="layui-col-md1" style="width: 50px;">'
	        		+			'<img src="'+data2[i].uimg+'" style="width: 30px; height: 30px; border-radius: 50%;" alt="头像">'
	        		+		'</div>'
	        		+		'<div class="layui-col-md11">'
	        		+			'<p style="margin-bottom: 0px;"><spen color="#fb7299;">'+data2[i].uname+'</spen>&emsp;'+data2[i].cmessage+'</p>'
	        		+			'<p style="font-size: 14px;">'
	        		+				'<span>'+data2[i].cdate+'</span>';
	        		if(data2[i].cuid==1){
	        			dataMessage +='<i class="layui-icon layui-icon-praise" style="line-height: 17px; color: #1E9FFF; margin-left: 20px;" '
	        				+ 'id="praiseId'+data2[i].cid+'" onclick="praiseSumbit(`'+data2[i].cid+'`);"><span style="padding-left: 2px; '
	        				+ 'font-size: 12px; color: #212529;" id="praiseSubmitNumber'+data2[i].cid+'">';
	        			if(data2[i].cpraise!=0){
	        				dataMessage += data2[i].cpraise;
		        		}
	        			dataMessage += '</span></i>';
	        		} else {
	        			dataMessage += '<i class="layui-icon layui-icon-praise" style="line-height: 17px; margin-left: 20px;" '
	        				+ 'id="praiseId'+data2[i].cid+'" onclick=praiseSumbit(`'+data2[i].cid+'`);><span '
	        				+ 'style="padding-left: 2px; font-size: 12px;" id="praiseSubmitNumber'+data2[i].cid+'">';
	        			if(data2[i].cpraise!=0){
	        				dataMessage += data2[i].cpraise
		        		} else {
		        			dataMessage += '';
		        		}
	        			dataMessage += '</span></i>';
	        		}
	        		dataMessage +='<i class="layui-icon layui-icon-tread" style="line-height: 17px; margin-left: 20px;';
	        		if(data2[i].cuid==2){
	        			dataMessage += 'color: #1e9fff;"';
	        		} else {
	        			dataMessage += '"';
	        		}
	        		dataMessage += 'id="treadId'+data2[i].cid+'" onclick="treadSumbit(`'+data2[i].cid+'`);"></i>';
	        		dataMessage += '<span class="layui-btn layui-btn-xs layui-btn-normal" style="margin-left: 20px;" id="writeBack" onclick="writeBack(`'+data2[i].ctid+'`,`'+data2[i].uid+'`,`'+data2[i].tid+'`,`'+data2[i].uname+'`,`'+data2[i].cid+'`);">回复</span>&emsp;'
	        		+			'</p>'
	        		+		'</div>'
	        		+	'</div>'
	        		+'</label>'
	        		+'</div>';
	        }
	        dataMessage += '</span>';
	        $("#replyToLoad"+cid).html(dataMessage);
		}
	});
		
}
</script>





				</form>
			</div>
		</div>
	</div>
	<br>

	<div class="container">
		<div class="row">
			<div class="layui-col-xs12">
				<div class="layui-col-xs4" style="padding-right: 15px;">
					<h4>关于我们</h4>
					<hr width="300px">
					<p>&emsp;&emsp;碳氢知识由碳三氢二独立设计完成，网站的服务对象为初三到高三学习化学的学子，为他们在化学的道路上助力。</p>
					<p>&emsp;&emsp;网站宣言：用知识改变生活，前人为后人铺路。</p>
				</div>
				<div class="layui-col-xs4" style="padding: 0 15px;">
					<h4>网站标签</h4>
					<hr width="300px">
					<span class="layui-btn layui-btn-primary layui-btn-sm">初中化学</span>
					<span class="layui-btn layui-btn-primary layui-btn-sm">高中化学</span>
					<span class="layui-btn layui-btn-primary layui-btn-sm">有机化学</span><br>
					<br> <span class="layui-btn layui-btn-primary layui-btn-sm">无机化学</span>
					<span class="layui-btn layui-btn-primary layui-btn-sm">知识分享</span>
					<span class="layui-btn layui-btn-primary layui-btn-sm">题目新颖</span><br>
					<br> <span class="layui-btn layui-btn-primary layui-btn-sm">学以致用</span>
					<span class="layui-btn layui-btn-primary layui-btn-sm">由浅入深</span>
					<span class="layui-btn layui-btn-primary layui-btn-sm">独立设计</span><br>
				</div>
				<div class="layui-col-xs4" style="padding-left: 15px;">
					<h4>联系方式</h4>
					<hr width="300px">
					<p>联系电话：18996542291</p>
					<p>电子邮箱：tansanqinger@gmail.com</p>
					<p>无论是想加入还是提出已经，都欢迎通过上述方式与我联系。</p>
				</div>
				<div class="layui-col-xs12">
					<hr>
					<span>版权所有&copy;网站一切解释权属于碳氢平台</span>&emsp;&emsp;&emsp; <a
						class="span_bottom"
						href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=50010102000726">
						<img style="vertical-align: middle;" src="/img/put_on_records.png"
						width="14px" />渝公网安备50010102000726号
					</a>
				</div>
			</div>

		</div>
	</div>
</body>
<script type="text/javascript">
	$(function() {
		let height = window.innerHeight;
		$("#containerDiv").css("min-height", height - 410 + "px");
		$("#supportPage").css("min-height", height - 580 + "px");
	});
</script>
<script type="text/javascript">
	$(function() {
		var a = $("#tmessageSpan").text();
		$("#tmessageSpan").html(a);
		var b = $("#tdifficultySpan").text();
		if (b == 0) {
			$("#tdifficultySpan").html('★')
		} else if (b == 1) {
			$("#tdifficultySpan").html('★★')
		} else if (b == 2) {
			$("#tdifficultySpan").html('★★★')
		} else if (b == 3) {
			$("#tdifficultySpan").html('★★★★')
		} else if (b == 4) {
			$("#tdifficultySpan").html('★★★★★')
		}
	})
</script>
<script>
	let submitNumber = 0;
	layui
			.use(
					[ 'layer', 'form', 'xmSelect', 'layedit' ],
					function() {
						var $ = layui.jquery;
						var layer = layui.layer;
						var form = layui.form;
						var xmSelect = layui.xmSelect;
						var layedit = layui.layedit;
						let hrefMessage = '';
						form.on('radio(raQTxxx)', function(data) {
							hrefMessage = data.value;
						});
						$("#addCommentOneTiter").click(
								function() {
									let message = $(
											"#addCommentOneTiterMessage").val()
											+ '';
									$("#addCommentOneTiterMessage").val('');
									if (message.trim() === '') {
										layer.msg("把你的想法先输入到框中吧！", {
											icon : 2
										});
										return false;
									}
									let params = {};
									params.tid = $("#tid").attr('name');
									params.titer = 1;
									params.ctid = 0;
									params.wuid = 0;
									params.wcid = 0;
									params.message = message;
									$.ajax({
										url : '/topic/user/addComment',
										type : 'post',
										data : params,
										dataType : 'json',
										success : function(data) {
											if (data.code == 0) {
												layer.msg(data.msg, {
													icon : 1
												});
												let dataMessage ='';
												dataMessage += '<div class="layui-form-item layui-col-md12" id="submitNumber'+submitNumber+'"'
													+	'style="height: 60px; width: 60px; margin: 0 10px; line-height: 60px;">'
													+	'<img src="'+$("#userImgUrl").attr("name")+'"'
													+		'style="width: 60px; height: 60px; border-radius: 50%;" alt="头像"><br>'
													+	'<br>'
													+'</div>'
													+'<div class=""'
													+	'style="min-height: 100px; padding: 0px 0px; margin-left: 110px;">'
													+	'<div class="layui-col-md12" style="min-height: 100px;">'
													+		'<label class="layui-form-label layui-col-xs12"'
													+			'style="width: 100%; text-align: left; padding: 0px 0px; font-size: 14px;">'
													+			'<p style="margin-bottom: 5px; font-size: 16px; color: #fb7299">'+data.uname+'</p>'
													+			'<p style="margin-bottom: 5px;">'+data.cmessage+'</p>'
													+			'<p>'
													+				'<span>'+data.cdate+'</span>';
														if(data.cuid==1){
										        			dataMessage +='<i class="layui-icon layui-icon-praise" style="line-height: 17px; color: #1E9FFF; margin-left: 20px;" '
										        				+ 'id="praiseId'+data.cid+'" onclick="praiseSumbit(`'+data.cid+'`);"><span style="padding-left: 2px; '
										        				+ 'font-size: 12px; color: #212529;" id="praiseSubmitNumber'+data.cid+'">';
										        			if(data.cpraise!=0){
										        				dataMessage += data.cpraise;
											        		}
										        			dataMessage += '</span></i>';
										        		} else {
										        			dataMessage += '<i class="layui-icon layui-icon-praise" style="line-height: 17px; margin-left: 20px;" '
										        				+ 'id="praiseId'+data.cid+'" onclick=praiseSumbit(`'+data.cid+'`);><span '
										        				+ 'style="padding-left: 2px; font-size: 12px;" id="praiseSubmitNumber'+data.cid+'">';
										        			if(data.cpraise!=0){
										        				dataMessage += data.cpraise
											        		} else {
											        			dataMessage += '';
											        		}
										        			dataMessage += '</span></i>';
										        		}
										        		dataMessage +='<i class="layui-icon layui-icon-tread" style="line-height: 17px; margin-left: 20px;';
										        		if(data.cuid==2){
										        			dataMessage += 'color: #1e9fff;"';
										        		} else {
										        			dataMessage += '"';
										        		}
										        		dataMessage += 'id="treadId'+data.cid+'" onclick="treadSumbit(`'+data.cid+'`);"></i>';
										        		dataMessage += '<span class="layui-btn layui-btn-xs layui-btn-normal" style="margin-left: 20px;" id="writeBack" onclick="writeBack(`'+data.cid+'`,`'+data.uid+'`,`'+data.tid+'`,`'+data.uname+'`,`'+data.cid+'`);">回复</span>&emsp;'
														if(data.cnumber!=0){
															dataMessage += 	'<span class="layui-btn layui-btn-xs layui-btn-normal" '
																		+	'style="margin-left: 20px;" '
																		+	'id="selectWriteBack" '
																		+	'onclick="selectWriteBack('+data.cid+');">查看回复（<span '
																		+	'id="writeBackNumber'+data.cid+'">'+data.cnumber+'</span>）'
																		+	'</span>';
														}	
												dataMessage+='</p>'
													+		'</label>'
													+	'</div>'
													+'</div>'
													+'<span id="replyToLoad'+data.cid+'" name="0"><span id="replyToLoadMessageSpan'+cid+'"></span></span>'
													+'<div style="padding-left: 110px; display: none;" id="addCommentTwoTiterDiv'+data.cid+'">'
													+	'<div class="layui-form-item layui-col-md12"'
													+		'style="height: 60px; width: 60px; margin: 0 10px; line-height: 100px;">'
													+		'<img src="'+$("#userImgUrl").attr("name")+'"'
													+			'style="width: 60px; height: 60px; border-radius: 50%;" alt="头像"><br>'
													+		'<br>'
													+	'</div>'
													+	'<div class="layui-input-block">'
													+		'<div class="layui-col-md11" style="padding-right: 8px;">'
													+			'<textarea placeholder="" class="layui-textarea"'
													+				'style="resize: none;" id="addCommentTwoTiterMessage'+data.cid+'"></textarea>'
													+		'</div>'
													+		'<div class="layui-col-md1" style="padding-left: 7px;">'
													+			'<span class="layui-btn layui-bg-blue"'
													+				'style="height: 100px; border-radius: 5px; padding-top:12px;"'
													+				'onclick="addCommentTwoTiter(`'+data.cid+'`);">'
													+				'发表<br>评论'
													+			'</span>'
													+		'</div>'
													+	'</div>'
													+'</div>'
													+'<div class="layui-form-item layui-col-md12"'
													+	'style="padding-left: 110px; margin-top: 5px;">'
													+	'<hr>'
													+'</div>';
												if(submitNumber==0){
													$("#commentShowArea").before(dataMessage);	
												} else {
													$("#submitNumber"+(submitNumber-1)).before(dataMessage);	
												}
												submitNumber++;
											} else {
												layer.msg(data.msg, {
													icon : 2
												});
											}
										}
									});
									return false;
								})
						$("#eQuestionSubmit")
								.click(
										function() {
											if ($(this).text() === '提交答案') {
												if ($("#containerDiv").attr(
														"name") == 1) {
													var arr = new Array();
													$(
															"input:checkbox[name='like']:checked")
															.each(
																	function(i) {
																		arr[i] = $(
																				this)
																				.val();
																	});
													hrefMessage = arr.join(",")
															+ '';
												} else if ($("#containerDiv")
														.attr("name") == 3
														|| $("#containerDiv")
																.attr("name") == 4) {
													hrefMessage = $(
															"#tanswerMessage")
															.val();
												}
												if (hrefMessage === '') {
													layer.msg("请给出你的答案", {
														icon : 2
													});
													return false;
												}
												let params = {};
												params.tid = $("#tid").attr(
														'name');
												params.tanswer = hrefMessage;
												$
														.ajax({
															url : '/topic/user/verify',
															type : 'post',
															data : params,
															dataType : 'json',
															success : function(
																	data) {
																if (data.code == 0) {
																	layer
																			.msg(
																					'恭喜你，回答正确',
																					{
																						icon : 1
																					});
																} else {
																	layer
																			.msg(
																					'很遗憾，回答错误',
																					{
																						icon : 2
																					});
																}
																$(
																		"#eQuestionSubmit")
																		.text(
																				"下一题");
																$("#tanswerDiv")
																		.css(
																				"display",
																				"block");
																$("#tanswer")
																		.text(
																				"参考答案："
																						+ data.msg);
																
																
																
	var data2 = eval(data.commentes);
	let dataMessage = "";
    for(var i in data2){															
    	dataMessage += '<div class="layui-form-item layui-col-md12"'
			+	'style="height: 60px; width: 60px; margin: 0 10px; line-height: 60px;">'
			+	'<img src="'+data2[i].uimg+'"'
			+		'style="width: 60px; height: 60px; border-radius: 50%;" alt="头像"><br>'
			+	'<br>'
			+'</div>'
			+'<div class=""'
			+	'style="min-height: 100px; padding: 0px 0px; margin-left: 110px;">'
			+	'<div class="layui-col-md12" style="min-height: 100px;">'
			+		'<label class="layui-form-label layui-col-xs12"'
			+			'style="width: 100%; text-align: left; padding: 0px 0px; font-size: 14px;">'
			+			'<p style="margin-bottom: 5px; font-size: 16px; color: #fb7299">'+data2[i].uname+'</p>'
			+			'<p style="margin-bottom: 5px;">'+data2[i].cmessage+'</p>'
			+			'<p>'
			+				'<span>'+data2[i].cdate+'</span>';
				if(data2[i].cuid==1){
        			dataMessage +='<i class="layui-icon layui-icon-praise" style="line-height: 17px; color: #1E9FFF; margin-left: 20px;" '
        				+ 'id="praiseId'+data2[i].cid+'" onclick="praiseSumbit(`'+data2[i].cid+'`);"><span style="padding-left: 2px; '
        				+ 'font-size: 12px; color: #212529;" id="praiseSubmitNumber'+data2[i].cid+'">';
        			if(data2[i].cpraise!=0){
        				dataMessage += data2[i].cpraise;
	        		}
        			dataMessage += '</span></i>';
        		} else {
        			dataMessage += '<i class="layui-icon layui-icon-praise" style="line-height: 17px; margin-left: 20px;" '
        				+ 'id="praiseId'+data2[i].cid+'" onclick=praiseSumbit(`'+data2[i].cid+'`);><span '
        				+ 'style="padding-left: 2px; font-size: 12px;" id="praiseSubmitNumber'+data2[i].cid+'">';
        			if(data2[i].cpraise!=0){
        				dataMessage += data2[i].cpraise
	        		} else {
	        			dataMessage += '';
	        		}
        			dataMessage += '</span></i>';
        		}
        		dataMessage +='<i class="layui-icon layui-icon-tread" style="line-height: 17px; margin-left: 20px;';
        		if(data2[i].cuid==2){
        			dataMessage += 'color: #1e9fff;"';
        		} else {
        			dataMessage += '"';
        		}
        		dataMessage += 'id="treadId'+data2[i].cid+'" onclick="treadSumbit(`'+data2[i].cid+'`);"></i>';
        		dataMessage += '<span class="layui-btn layui-btn-xs layui-btn-normal" style="margin-left: 20px;" id="writeBack" onclick="writeBack(`'+data2[i].cid+'`,`'+data2[i].uid+'`,`'+data2[i].tid+'`,`'+data2[i].uname+'`,`'+data2[i].cid+'`);">回复</span>&emsp;'
					
				if(data2[i].cnumber!=0){
					dataMessage += 	'<span class="layui-btn layui-btn-xs layui-btn-normal" '
								+	'style="margin-left: 20px;" '
								+	'id="selectWriteBack" '
								+	'onclick="selectWriteBack('+data2[i].cid+');">查看回复（<span '
								+	'id="writeBackNumber'+data2[i].cid+'">'+data2[i].cnumber+'</span>）'
								+	'</span>';
				}	
		dataMessage+='</p>'
			+		'</label>'
			+	'</div>'
			+'</div>'
			+'<span id="replyToLoad'+data2[i].cid+'" name="0"><span id="replyToLoadMessageSpan'+data2[i].cid+'"></span></span>'
			+'<div style="padding-left: 110px; display: none;" id="addCommentTwoTiterDiv'+data2[i].cid+'">'
			+	'<div class="layui-form-item layui-col-md12"'
			+		'style="height: 60px; width: 60px; margin: 0 10px; line-height: 100px;">'
			+		'<img src="'+$("#userImgUrl").attr("name")+'"'
			+			'style="width: 60px; height: 60px; border-radius: 50%;" alt="头像"><br>'
			+		'<br>'
			+	'</div>'
			+	'<div class="layui-input-block">'
			+		'<div class="layui-col-md11" style="padding-right: 8px;">'
			+			'<textarea placeholder="" class="layui-textarea"'
			+				'style="resize: none;" id="addCommentTwoTiterMessage'+data2[i].cid+'"></textarea>'
			+		'</div>'
			+		'<div class="layui-col-md1" style="padding-left: 7px;">'
			+			'<span class="layui-btn layui-bg-blue"'
			+				'style="height: 100px; border-radius: 5px; padding-top:12px;"'
			+				'onclick="addCommentTwoTiter(`'+data2[i].cid+'`);">'
			+				'发表<br>评论'
			+			'</span>'
			+		'</div>'
			+	'</div>'
			+'</div>'
			+'<div class="layui-form-item layui-col-md12"'
			+	'style="padding-left: 110px; margin-top: 5px;">'
			+	'<hr>'
			+'</div>';	
    }
	$("#commentShowArea").html(dataMessage)	;														
																
																
																
																
																
																
																
																
																
																
																
																
																
																
																
																
																
																
															}
														});
											} else if ($("#eQuestionSubmit")
													.text() === '下一题') {
												location.reload();
											}
											return false;
										});
						//收藏题目
						$("#collectTopic")
								.click(
										function() {
											if ($("#collecticons")
													.attr("class") === 'layui-icon layui-icon-heart-fill') {
												layer
														.confirm(
																'确认要取消收藏？',
																function(index) {
																	let params = {};
																	params.tid = $(
																			"#tid")
																			.attr(
																					'name');
																	$
																			.ajax({
																				url : '/topic/user/collect',
																				type : 'post',
																				data : params,
																				dataType : 'json',
																				success : function(
																						data) {
																					if (data.code == 0) {
																						layer
																								.msg(
																										data.msg,
																										{
																											icon : 1
																										});
																					} else {
																						layer
																								.msg(
																										data.msg,
																										{
																											icon : 2
																										});
																					}
																				}
																			});
																	layer
																			.close(index);
																	document
																			.getElementById("collecticons").className = "layui-icon layui-icon-heart";
																	$(
																			"#collecticons")
																			.css(
																					"color",
																					"");
																	$(
																			"#collecttionsSpans")
																			.text(
																					'收藏本题');
																});
											} else {
												flag = true;
												document
														.getElementById("collecticons").className = "layui-icon layui-icon-heart-fill";
												$("#collecticons").css("color",
														"red");
												let params = {};
												params.tid = $("#tid").attr(
														'name');
												$
														.ajax({
															url : '/topic/user/collect',
															type : 'post',
															data : params,
															dataType : 'json',
															success : function(
																	data) {
																if (data.code == 0) {
																	$(
																			"#collecttionsSpans")
																			.text(
																					'取消收藏');
																	layer
																			.msg(
																					data.msg,
																					{
																						icon : 1
																					});
																} else {
																	layer
																			.msg(
																					data.msg,
																					{
																						icon : 2
																					});
																}
															}
														});
											}
										});
						//屏蔽本题
						$("#shieldTopic").click(function() {
							layer.confirm('确认要屏蔽本题？', function(index) {
								layer.close(index);
								let params = {};
								params.tid = $("#tid").attr('name');
								$.ajax({
									url : '/topic/user/shield',
									type : 'post',
									data : params,
									dataType : 'json',
									success : function(data) {
										if (data.code == 0) {
											layer.msg(data.msg, {
												icon : 1
											});
											setTimeout(function() {
												location.reload();
											}, 2000);
										} else {
											layer.msg(data.msg, {
												icon : 2
											});
										}
									}
								});
							});
						});
						//举报本题
						$("#reportTopic").click(function() {
							parent.layui.admin.prompt({
								title : '请输入举报的理由：',
								formType : 2
							}, function(value, index, elem) {
								parent.layer.close(index);
								let params = {};
								params.tid = $("#tid").attr('name');
								params.message = value;
								$.ajax({
									url : '/topic/user/report',
									type : 'post',
									data : params,
									dataType : 'json',
									success : function(data) {
										if (data.code == 0) {
											layer.msg(data.msg, {
												icon : 1
											});
										} else {
											layer.msg(data.msg, {
												icon : 2
											});
										}
									}
								});
							});
						});
						//题目有误
						$("#mistakeTopic").click(function() {
							parent.layui.admin.prompt({
								title : '请指出试题出现的问题：',
								formType : 2
							}, function(value, index, elem) {
								parent.layer.close(index);
								let params = {};
								params.tid = $("#tid").attr('name');
								params.message = value;
								$.ajax({
									url : '/topic/user/mistake',
									type : 'post',
									data : params,
									dataType : 'json',
									success : function(data) {
										if (data.code == 0) {
											layer.msg(data.msg, {
												icon : 1
											});
										} else {
											layer.msg(data.msg, {
												icon : 2
											});
										}
									}
								});
							});
						});
					});
	layui.use('element', function() {
		var element = layui.element;
	});
</script>
</html>
